package lab02.test35;
import java.util.Scanner;
public class Test35 {
    public static void main(String[] args) {
        Manager manager = new Manager();
        Saleman saleman = new Saleman();
        Worker worker = new Worker();

        System.out.println("请分别输入经理的姓名与工资：");
        Scanner scanner = new Scanner(System.in);
        manager.setName(scanner.next());
        manager.manthSalary = scanner.nextDouble();

        System.out.println("请分别输入销售人员的姓名，底薪，销售数量以及单位数量的佣金：");
        saleman.setName(scanner.next());
        saleman.baseSalary = scanner.nextDouble();
        saleman.couter = scanner.nextInt();
        saleman.wages = scanner.nextDouble();

        System.out.println("请分别输入员工的姓名，工作的天数以及每天的佣金：");
        worker.setName(scanner.next());
        worker.day = scanner.nextInt();
        worker.daySalary = scanner.nextDouble();

        System.out.println("经理：" + manager.getName() + ":" + manager.computeSalary());
        System.out.println("销售员：" + saleman.getName() + ":" + saleman.computeSalary());
        System.out.println("工人：" + worker.getName() + ":" + worker.computeSalary());
    }
}
